package com.ics.web.controller.travelstar.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ics.framework.util.PageUtil;
import com.ics.web.controller.travelstar.domain.TiresRegister;
import com.ics.web.controller.travelstar.dto.TiresRegisterDTO;
import com.ics.web.controller.travelstar.mapper.TbTiresRegisterMapper;
import com.ics.web.controller.travelstar.service.ITbTiresRegisterService;
import org.springframework.stereotype.Service;

/**
 * 留言信息Service业务层处理
 *
 * @author ics
 * @date 2024-09-18
 */
@Service
public class TbTiresRegisterServiceImpl extends ServiceImpl<TbTiresRegisterMapper, TiresRegister>
        implements ITbTiresRegisterService {


    @Override
    public IPage<TiresRegister> listPage(TiresRegisterDTO registerDTO) {
        LambdaQueryWrapper<TiresRegister> wrapper = Wrappers.lambdaQuery();
        wrapper.orderByDesc(TiresRegister::getCreateTime);
        return this.baseMapper.selectPage(PageUtil.getPage(registerDTO), wrapper);
    }
}
